home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / x11 / rpg / crossfir.92 / crossfir / crossfire-0.92.5 / utils / flushlocks < prev    next >
Text File  |  1996-07-24  |  430b  |  23 lines

  1. #!/bin/sh -
  2. # $Id: flushlocks,v 1.1.1.1 1993/03/07 08:30:51 frankj Exp $
  3. #
  4. # If you run this file daily from a crontab, it will clean up
  5. # old lock-files.
  6.  
  7. LIBDIR=xxxx
  8. PLAYERDIR=$LIBDIR/players
  9.  
  10. LOGFILE=$LIBDIR/adm/lock.log
  11. touch $LOGFILE
  12.  
  13. cd $PLAYERDIR
  14. files=`find ./ -type d -name \*.lock -mtime 1 -print`
  15. if test x"$files" = x; then
  16.   exit
  17. fi
  18. echo Flushing lockfiles `date` >>$LOGFILE
  19.   
  20. ls -ld $files >>$LOGFILE
  21.  
  22. rmdir $files
  23.